<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Add City</title>
</head>
<body>
	<h2>Add City</h2>
	<form method="post">
		<table>
			<tr>
				<td>ID:</td>
				<td><input type="text" name="id" value="${city.id}" /></td>
			</tr>
			<tr>
				<td>Name:</td>
				<td><input type="text" name="name" value="${city.name}" /></td>
			</tr>
			<tr>
				<td>CountryCode:</td>
				<td><select name="countrycode">
						<c:forEach var="code" items="${codes}">
							<c:if test="${city.getCountrycode() == code }">
								<option value="${code }" selected>${code }</option>
							</c:if>
							<c:if test="${city.getCountrycode() != code }">
								<option value="${code }">${code }</option>
							</c:if>
						</c:forEach>
				</select></td>
			</tr>
			<tr>
				<td>District:</td>
				<td><input type="text" name="district" value="${city.district}" /></td>
			</tr>
			<tr>
				<td>Population:</td>
				<td><input type="text" name="population"
					value="${city.population}" /></td>
			</tr>
			<tr>
				<td><input type="submit" value="Save" /></td>
				<td><input type="reset" value="Cancle" /></td>
			</tr>
		</table>
	</form>

</body>
</html>